home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Xext / XSGIStereoQueryExtension.z / XSGIStereoQueryExtension
Encoding:
Text File  |  2002-10-03  |  8.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666))))     XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XSGIStereoQueryExtension, XSGIStereoQueryVersion,
  10.           XSGIQueryStereoMode, XSGISetStereoMode, XSGISetStereoBuffer
  11.           - X SGI stereo functions
  12.  
  13.      SSSSYYYYNNNNTTTTAAAAXXXX
  14.           #include <X11/extensions/SGIStereo.h>
  15.  
  16.           Bool XSGIStereoQueryExtension (
  17.                Display * dpy,
  18.                int * first_event,
  19.                int * first_error);
  20.  
  21.           Status XSGIStereoQueryVersion (
  22.                Display * dpy,
  23.                int * major_version,
  24.                int * minor_version);
  25.  
  26.           int XSGIQueryStereoMode(
  27.                Display * dpy,
  28.                Window win);
  29.  
  30.           Status XSGISetStereoMode (
  31.                Display *dpy,
  32.                Window win,
  33.                unsigned short height,
  34.                unsigned short offset,
  35.                int mode);
  36.  
  37.           Status XSGISetStereoBuffer (
  38.                Display *dpy,
  39.                Window win,
  40.                int buffer);
  41.  
  42.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  43.           _d_p_y       Specifies the connection to the X server.
  44.  
  45.           _f_i_r_s_t__e_v_e_n_t
  46.                     Returns the code of the first custom event type
  47.                     created by the extension.
  48.  
  49.           _f_i_r_s_t__e_r_r_o_r
  50.                     Returns the code of the first custom error defined
  51.                     by the extension.
  52.  
  53.           _m_a_j_o_r__v_e_r_s_i_o_n
  54.                     Returns major version number for the extension.
  55.  
  56.           _m_i_n_o_r__v_e_r_s_i_o_n
  57.                     Returns minor version number for the extension.
  58.  
  59.           _w_i_n       Specifies the window on whose screen you want to
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666))))     XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.                     set or inquire the stereo mode.
  75.  
  76.           _h_e_i_g_h_t
  77.           _o_f_f_s_e_t    Specify the height of each stereo buffer, and the
  78.                     vertical offset between each stereo buffer.
  79.  
  80.           _m_o_d_e      Specifies the stereo mode to be set. Valid values
  81.                     are STEREO_OFF (0) to turn off stereo,
  82.                     STEREO_BOTTOM (1) to turn on stereo and use the
  83.                     bottom half of the screen as the primary buffer,
  84.                     STEREO_TOP (2) to turn on stereo and use the top
  85.                     half of the screen as the primary buffer.
  86.  
  87.           _b_u_f_f_e_r    Identifies which buffer the GL will render to.
  88.  
  89.  
  90.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  91.           _X_S_G_I_S_t_e_r_e_o_Q_u_e_r_y_E_x_t_e_n_s_i_o_n is used to check whether the X
  92.           server supports the SGI Stereo extension.  If the Stereo
  93.           extension is present, this routine will return True. If the
  94.           extension involves additional event types, the base event
  95.           type code is returned in _f_i_r_s_t__e_v_e_n_t. Otherwise, zero is
  96.           returned in _f_i_r_s_t__e_v_e_n_t. If the extension involves
  97.           additional error codes, the base error code is returned in
  98.           _f_i_r_s_t__e_r_r_o_r. Otherwise, zero is returned. If the SGI Stereo
  99.           extension is present, you must still query the individual
  100.           screens to find out if they support the extension, using
  101.           XSGIQueryStereoMode.
  102.  
  103.           _X_S_G_I_S_t_e_r_e_o_Q_u_e_r_y_V_e_r_s_i_o_n is used to get the version number of
  104.           the Stereo extension supported by the X server.
  105.  
  106.           _X_S_G_I_Q_u_e_r_y_S_t_e_r_e_o_M_o_d_e is used to query the server for the
  107.           current stereo mode. If the server supports the SGI Stereo
  108.           extension, but _w_i_n's screen does not, this routine will
  109.           return X_STEREO_UNSUPPORTED (-1). If _w_i_n's screen supports
  110.           the SGI Stereo extension, this routine will return one of
  111.           STEREO_OFF (0), STEREO_BOTTOM (1) or STEREO_TOP (2).
  112.  
  113.           _X_S_G_I_Q_u_e_r_y_S_t_e_r_e_o_M_o_d_e can generate _B_a_d_D_r_a_w_a_b_l_e.
  114.  
  115.           _X_S_G_I_S_e_t_S_t_e_r_e_o_M_o_d_e is used to inform the X server that full-
  116.           screen stereo is being turned on or off. It does not cause
  117.           the actual video timing to change. Rather, if turning on
  118.           stereo, this procedure informs the server that all future X
  119.           rendering is to be duplicated from the primary buffer to the
  120.           secondary buffer. Calling this procedure also causes the
  121.           cursor to be restricted to the primary buffer. Non-stereo GL
  122.           clients will render to the left eye, with the right eye
  123.           cleared to black.
  124.  
  125.           Conversely, if turning off stereo, this procedure informs
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666))))     XXXXSSSSGGGGIIIISSSSTTTTEEEERRRREEEEOOOO((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           the server to return to the normal state, with X rendering
  141.           allowed to the full screen and unrestricting the cursor.
  142.  
  143.           If turning on stereo, _h_e_i_g_h_t and _o_f_f_s_e_t describe the height
  144.           of each stereo buffer and the vertical offset between
  145.           buffers. Typically, these values should be 492 and 532
  146.           respectively. _h_e_i_g_h_t and _o_f_f_s_e_t are ignored if turning off
  147.           stereo.
  148.  
  149.           Stereo is turned off by setting _m_o_d_e to STEREO_OFF (0), and
  150.           is turned on by setting _m_o_d_e to STEREO_BOTTOM or STEREO_TOP
  151.           (1 or 2 respectively). Setting _m_o_d_e to STEREO_BOTTOM causes
  152.           the bottom half of the screen to become the primary buffer,
  153.           setting it to STEREO_TOP causes the top half of the screen
  154.           to become the primary buffer.  To switch from using the top
  155.           half of the screen as the primary buffer to using the bottom
  156.           half of the screen as the primary buffer, _X_S_G_I_S_e_t_S_t_e_r_e_o_M_o_d_e
  157.           should first be called with _m_o_d_e set to STEREO_OFF.
  158.  
  159.           NOTE: The application will not normally call this procedure.
  160.           Instead, it will call setmonitor, which will update both the
  161.           X server state and the actual video format.
  162.  
  163.           _X_S_G_I_S_e_t_S_t_e_r_e_o_M_o_d_e can generate _B_a_d_D_r_a_w_a_b_l_e and _B_a_d_R_e_q_u_e_s_t.
  164.  
  165.           _X_S_G_I_S_e_t_S_t_e_r_e_o_B_u_f_f_e_r is used to inform the X server of which
  166.           eye buffer the GL will render to next. The first time it's
  167.           called for a window, it also informs the server that the
  168.           window is a stereo window.  _b_u_f_f_e_r identifies which buffer
  169.           to set up. Valid values are STEREO_BUFFER_LEFT and
  170.           STEREO_BUFFER_RIGHT. If stereo mode is turned on (by calling
  171.           XSGISetStereoMode), a call to XSGISetStereoBuffer will cause
  172.           the X server to set the clip and window origin appropriately
  173.           for the GL client. OpenGL applications should call _g_l_X_W_a_i_t_G_L
  174.           before calling XSGISetStereoBuffer, to ensure that all GL
  175.           rendering has completed before switching which buffer to
  176.           render to.
  177.  
  178.           _X_S_G_I_S_e_t_S_t_e_r_e_o_B_u_f_f_e_r can generate _B_a_d_D_r_a_w_a_b_l_e and _B_a_d_V_a_l_u_e
  179.           errors.
  180.  
  181.           Applications calling one of these routines should link with
  182.           libXext.
  183.  
  184.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  185.                setmon, setmonitor, viewport, winset, glXWaitGL
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.